/*
 * anaekran.java
 *
 * Created on 07 Mayıs 2008 Çarşamba, 10:52
 */
package mocawa_hsqldb_101_2;

import java.awt.print.PrinterException;
import java.io.File;
import java.lang.String;
import java.lang.String;
import java.sql.SQLException;
import java.text.MessageFormat;
import java.util.Enumeration;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JTable;
import tarayici_kontrolu.tarayici_ackapa;

/**
 *
 * @author  Suat ATAN
 */
public class anaekran extends javax.swing.JFrame implements global.global_variables {

    /** Creates new form anaekran */
    public anaekran() {
        initComponents();

        try {

            op.teklif_listele("SELECT * FROM TEKLIFLER", TABLO1);
        } catch (Exception ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);


        }


    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        DIA_TEKLIF_EDITORU = new javax.swing.JDialog();
        DIA_TEKLIF_EDITOR_PANELI = new javax.swing.JPanel();
        TXT_TEKLIF_TO = new javax.swing.JTextField();
        LB_TEKLIF_TO = new javax.swing.JLabel();
        LB_SON_GECERLILIK_TARIHI = new javax.swing.JLabel();
        TXT_SON_GECERLILIK_TARIHI = new javax.swing.JTextField();
        LB_YETKILI = new javax.swing.JLabel();
        TXT_YETKILI = new javax.swing.JTextField();
        LB_TELEFON = new javax.swing.JLabel();
        TXT_TELEFON = new javax.swing.JTextField();
        LB_FAX = new javax.swing.JLabel();
        TXT_FAX = new javax.swing.JTextField();
        LB_TEKLIF_TARIHI = new javax.swing.JLabel();
        TXT_TEKLIF_TARIHI = new javax.swing.JTextField();
        LB_TEKLIF_OLUSTURMA_GUNCELLEME_FORMU = new javax.swing.JLabel();
        BT_TEKLIF_EKLE = new javax.swing.JButton();
        LB_TEKLIF_OLUSTURMA_STATUS = new javax.swing.JLabel();
        TEKLIFNO = new javax.swing.JLabel();
        TXT_TEKLIFNO = new javax.swing.JTextField();
        BT_TEKLIFI_GUNCELLE = new javax.swing.JButton();
        DIA_TEKLIF_DETAYI = new javax.swing.JDialog();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        TABLO2 = new javax.swing.JTable();
        LB_TEKLIF_DETAYLARI_BASLIK = new javax.swing.JLabel();
        YENI_EBAT_EKLE = new javax.swing.JButton();
        LB_BAG_TEK_NO = new javax.swing.JLabel();
        LB_BAG_TEK_NO_DINAMIK = new javax.swing.JLabel();
        EBAT_TABLOSU_YENILE = new javax.swing.JButton();
        SECILI_EBADI_SIL = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        TABLO3 = new javax.swing.JTable();
        LB_ILGILI_TEKLIF = new javax.swing.JLabel();
        EBAT_PRINT = new javax.swing.JButton();
        HELP_LAB1 = new javax.swing.JLabel();
        DIA_TUM_EBATLAR = new javax.swing.JDialog();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        TABLO4 = new javax.swing.JTable();
        LB_TUM_EBATLAR = new javax.swing.JLabel();
        DIA_YARDIM = new javax.swing.JDialog();
        jPanel3 = new javax.swing.JPanel();
        LB_SUATATAN_RESIM = new javax.swing.JLabel();
        LB_HLP_1 = new javax.swing.JLabel();
        LB_HLP_2 = new javax.swing.JLabel();
        LB_HLP_3 = new javax.swing.JLabel();
        suatatancom_reklam = new javax.swing.JLabel();
        LB_HLP_5 = new javax.swing.JLabel();
        LB_HLP_6 = new javax.swing.JLabel();
        ANAEKRAN_PANEL = new javax.swing.JPanel();
        LOGO = new javax.swing.JLabel();
        SCROLL1 = new javax.swing.JScrollPane();
        TABLO1 = new javax.swing.JTable();
        LB_TEKLIFLERINIZ = new javax.swing.JLabel();
        BT_TEKLIF_EKLE_EKRANINI_AC = new javax.swing.JButton();
        BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_AC = new javax.swing.JButton();
        SECILI_TEKLIFI_SIL = new javax.swing.JButton();
        SECILI_TEKLIF_DETAYI_INCELE = new javax.swing.JButton();
        BT_TUM_EBATLARI_LISTELE = new javax.swing.JButton();
        LB_SEC_TEK_NO = new javax.swing.JLabel();
        TXT_SECILI_TEKLIF_NO = new javax.swing.JTextField();
        MENU = new javax.swing.JMenuBar();
        MENU_PROGRAM = new javax.swing.JMenu();
        MENU_BIRIMFIYATKONF = new javax.swing.JMenuItem();
        MENU_YARDIM = new javax.swing.JMenu();
        MENU_PROGRAM_HAKKINDA = new javax.swing.JMenuItem();

        DIA_TEKLIF_EDITOR_PANELI.setBackground(new java.awt.Color(255, 255, 255));

        LB_TEKLIF_TO.setLabelFor(TXT_TEKLIF_TO);
        LB_TEKLIF_TO.setText("Muhattap Firma:");

        LB_SON_GECERLILIK_TARIHI.setLabelFor(TXT_SON_GECERLILIK_TARIHI);
        LB_SON_GECERLILIK_TARIHI.setText("Teklif son geçerlilik tarihi:");

        LB_YETKILI.setLabelFor(TXT_YETKILI);
        LB_YETKILI.setText("Yetkili Adı Soyadı:");

        LB_TELEFON.setLabelFor(TXT_TELEFON);
        LB_TELEFON.setText("Telefon:");

        LB_FAX.setLabelFor(TXT_FAX);
        LB_FAX.setText("Fax:");

        LB_TEKLIF_TARIHI.setLabelFor(TXT_TEKLIF_TARIHI);
        LB_TEKLIF_TARIHI.setText("Teklif tarihi:");

        LB_TEKLIF_OLUSTURMA_GUNCELLEME_FORMU.setFont(new java.awt.Font("Arial", 1, 14));
        LB_TEKLIF_OLUSTURMA_GUNCELLEME_FORMU.setForeground(new java.awt.Color(204, 153, 0));
        LB_TEKLIF_OLUSTURMA_GUNCELLEME_FORMU.setText("TEKLİF OLUŞTURMA/ GÜNCELLEME FORMU:");

        BT_TEKLIF_EKLE.setText("TEKLİF OLUŞTUR");
        BT_TEKLIF_EKLE.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                BT_TEKLIF_EKLEMouseClicked(evt);
            }
        });

        LB_TEKLIF_OLUSTURMA_STATUS.setBackground(new java.awt.Color(255, 204, 0));
        LB_TEKLIF_OLUSTURMA_STATUS.setForeground(new java.awt.Color(255, 51, 0));

        TEKLIFNO.setText("Teklif Kodu:");

        TXT_TEKLIFNO.setToolTipText("Yeni teklif için otomatik olarak oluşturulur");
        TXT_TEKLIFNO.setEnabled(false);

        BT_TEKLIFI_GUNCELLE.setText("TEKLİFİ GÜNCELLE");
        BT_TEKLIFI_GUNCELLE.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                BT_TEKLIFI_GUNCELLEMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout DIA_TEKLIF_EDITOR_PANELILayout = new javax.swing.GroupLayout(DIA_TEKLIF_EDITOR_PANELI);
        DIA_TEKLIF_EDITOR_PANELI.setLayout(DIA_TEKLIF_EDITOR_PANELILayout);
        DIA_TEKLIF_EDITOR_PANELILayout.setHorizontalGroup(
            DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                .addComponent(BT_TEKLIF_EKLE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(BT_TEKLIFI_GUNCELLE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                .addComponent(LB_TELEFON, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGap(64, 64, 64)
                                .addComponent(TXT_TELEFON, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                .addComponent(LB_YETKILI, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGap(64, 64, 64)
                                .addComponent(TXT_YETKILI, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                .addComponent(LB_SON_GECERLILIK_TARIHI)
                                .addGap(64, 64, 64)
                                .addComponent(TXT_SON_GECERLILIK_TARIHI, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                        .addComponent(LB_FAX, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addGap(64, 64, 64))
                                    .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                        .addComponent(LB_TEKLIF_TARIHI)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(TXT_FAX, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                                    .addComponent(TXT_TEKLIF_TARIHI)))
                            .addComponent(LB_TEKLIF_OLUSTURMA_GUNCELLEME_FORMU, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                        .addComponent(LB_TEKLIF_TO, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addGap(64, 64, 64))
                                    .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                                        .addComponent(TEKLIFNO)
                                        .addGap(127, 127, 127)))
                                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(TXT_TEKLIF_TO, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                                    .addComponent(TXT_TEKLIFNO)))))
                    .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                        .addGap(227, 227, 227)
                        .addComponent(LB_TEKLIF_OLUSTURMA_STATUS, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)))
                .addContainerGap())
        );
        DIA_TEKLIF_EDITOR_PANELILayout.setVerticalGroup(
            DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(LB_TEKLIF_OLUSTURMA_GUNCELLEME_FORMU)
                .addGap(23, 23, 23)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TEKLIFNO)
                    .addComponent(TXT_TEKLIFNO, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TXT_TEKLIF_TO, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(LB_TEKLIF_TO))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TXT_SON_GECERLILIK_TARIHI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(LB_SON_GECERLILIK_TARIHI))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TXT_YETKILI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(LB_YETKILI))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TXT_TELEFON, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(LB_TELEFON))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(TXT_FAX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(LB_FAX))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(TXT_TEKLIF_TARIHI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(LB_TEKLIF_TARIHI))
                .addGap(24, 24, 24)
                .addGroup(DIA_TEKLIF_EDITOR_PANELILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BT_TEKLIF_EKLE)
                    .addComponent(BT_TEKLIFI_GUNCELLE))
                .addGap(18, 18, 18)
                .addComponent(LB_TEKLIF_OLUSTURMA_STATUS, javax.swing.GroupLayout.DEFAULT_SIZE, 22, Short.MAX_VALUE)
                .addContainerGap())
        );

        DIA_TEKLIF_EDITORU.getContentPane().add(DIA_TEKLIF_EDITOR_PANELI, java.awt.BorderLayout.CENTER);

        DIA_TEKLIF_DETAYI.setTitle("TEKLİF DETAYLARI EKRANI (EBATLAR)");
        DIA_TEKLIF_DETAYI.setFont(new java.awt.Font("Arial", 0, 10));
        DIA_TEKLIF_DETAYI.getContentPane().setLayout(new javax.swing.BoxLayout(DIA_TEKLIF_DETAYI.getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jPanel1.setFont(new java.awt.Font("Arial", 0, 11));

        TABLO2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(TABLO2);

        LB_TEKLIF_DETAYLARI_BASLIK.setFont(new java.awt.Font("Arial", 1, 14));
        LB_TEKLIF_DETAYLARI_BASLIK.setForeground(new java.awt.Color(0, 0, 51));
        LB_TEKLIF_DETAYLARI_BASLIK.setText("TEKLİF DETAYLARI:");

        YENI_EBAT_EKLE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/ebatekle.png"))); // NOI18N
        YENI_EBAT_EKLE.setText("YENİ EBAT EKLE");
        YENI_EBAT_EKLE.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                YENI_EBAT_EKLEMouseClicked(evt);
            }
        });

        LB_BAG_TEK_NO.setText("Bağlı Teklif No:");

        LB_BAG_TEK_NO_DINAMIK.setText("...");

        EBAT_TABLOSU_YENILE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/refresh.png"))); // NOI18N
        EBAT_TABLOSU_YENILE.setText("TABLO YENİLE");
        EBAT_TABLOSU_YENILE.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                EBAT_TABLOSU_YENILEMouseClicked(evt);
            }
        });

        SECILI_EBADI_SIL.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/ebatsil.png"))); // NOI18N
        SECILI_EBADI_SIL.setText("SEÇİLİ EBADI SİL");
        SECILI_EBADI_SIL.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                SECILI_EBADI_SILMouseClicked(evt);
            }
        });

        TABLO3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        TABLO3.setShowHorizontalLines(false);
        jScrollPane2.setViewportView(TABLO3);

        LB_ILGILI_TEKLIF.setFont(new java.awt.Font("Arial", 1, 14));
        LB_ILGILI_TEKLIF.setForeground(new java.awt.Color(0, 0, 51));
        LB_ILGILI_TEKLIF.setText("İLGİLİ TEKLİF");

        EBAT_PRINT.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/ebatyazdır.png"))); // NOI18N
        EBAT_PRINT.setText("TEKLİF DETAYINI YAZDIR");
        EBAT_PRINT.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                EBAT_PRINTMouseClicked(evt);
            }
        });

        HELP_LAB1.setText("Baskı önizleme yapılınca, önizleme üzerindeki tabloyu çift tıklayarak yazdırılmasını istemediğiniz sütunları çıkarabilirsiniz.");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1127, Short.MAX_VALUE)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1127, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                .addComponent(LB_BAG_TEK_NO)
                                .addGap(18, 18, 18)
                                .addComponent(LB_BAG_TEK_NO_DINAMIK, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(LB_ILGILI_TEKLIF, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(LB_TEKLIF_DETAYLARI_BASLIK, javax.swing.GroupLayout.Alignment.LEADING))
                        .addContainerGap())
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(YENI_EBAT_EKLE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(SECILI_EBADI_SIL)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(EBAT_PRINT)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 410, Short.MAX_VALUE)
                        .addComponent(EBAT_TABLOSU_YENILE)
                        .addGap(87, 87, 87))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(HELP_LAB1)
                        .addContainerGap(577, Short.MAX_VALUE))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(LB_ILGILI_TEKLIF)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(LB_BAG_TEK_NO)
                    .addComponent(LB_BAG_TEK_NO_DINAMIK))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27)
                .addComponent(LB_TEKLIF_DETAYLARI_BASLIK)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(YENI_EBAT_EKLE)
                    .addComponent(SECILI_EBADI_SIL)
                    .addComponent(EBAT_PRINT)
                    .addComponent(EBAT_TABLOSU_YENILE))
                .addGap(18, 18, 18)
                .addComponent(HELP_LAB1)
                .addContainerGap(16, Short.MAX_VALUE))
        );

        LB_BAG_TEK_NO_DINAMIK.getAccessibleContext().setAccessibleDescription("TABLO1'DEN SECILEN TEKLINOYA GORE DINAMIK OLARAK DEGISIR");

        DIA_TEKLIF_DETAYI.getContentPane().add(jPanel1);

        DIA_TUM_EBATLAR.setTitle("TEKLİF DETAYLARI EKRANI (EBATLAR)");
        DIA_TUM_EBATLAR.setFont(new java.awt.Font("Arial", 0, 10));
        DIA_TUM_EBATLAR.getContentPane().setLayout(new javax.swing.BoxLayout(DIA_TUM_EBATLAR.getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jPanel2.setFont(new java.awt.Font("Arial", 0, 11));

        TABLO4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane3.setViewportView(TABLO4);

        LB_TUM_EBATLAR.setFont(new java.awt.Font("Arial", 1, 14));
        LB_TUM_EBATLAR.setForeground(new java.awt.Color(0, 0, 51));
        LB_TUM_EBATLAR.setText("TÜM EBATLAR");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 1083, Short.MAX_VALUE)
                    .addComponent(LB_TUM_EBATLAR))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(LB_TUM_EBATLAR)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31))
        );

        DIA_TUM_EBATLAR.getContentPane().add(jPanel2);

        DIA_YARDIM.setMinimumSize(new java.awt.Dimension(900, 210));
        DIA_YARDIM.getContentPane().setLayout(new javax.swing.BoxLayout(DIA_YARDIM.getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));

        LB_SUATATAN_RESIM.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/suatatan.jpg"))); // NOI18N

        LB_HLP_1.setFont(new java.awt.Font("Tahoma", 1, 14));
        LB_HLP_1.setForeground(new java.awt.Color(255, 51, 0));
        LB_HLP_1.setText("MOCAWA 1.0 STABLE");

        LB_HLP_2.setText("Mukavva Üreticileri için Suat ATAN tarafından geliştirildi...");

        LB_HLP_3.setText("Suat ATAN(İnşaat Mühendisi)");
        LB_HLP_3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                LB_HLP_3MouseClicked(evt);
            }
        });

        suatatancom_reklam.setForeground(new java.awt.Color(0, 0, 255));
        suatatancom_reklam.setText("Web Sitesi: www.suatatan.com");
        suatatancom_reklam.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                suatatancom_reklamMouseClicked(evt);
            }
        });

        LB_HLP_5.setText("Program hakkındaki sorularınız için kullandığınız program versiyonu işletim sisteminiz");

        LB_HLP_6.setText("gibi verileri de bildirerek suatatan@gmail.com sayfasına mesaj atabilirsiniz.");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(LB_SUATATAN_RESIM)
                .addGap(27, 27, 27)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(LB_HLP_1)
                    .addComponent(LB_HLP_2)
                    .addComponent(LB_HLP_3)
                    .addComponent(suatatancom_reklam)
                    .addComponent(LB_HLP_5)
                    .addComponent(LB_HLP_6))
                .addContainerGap(62, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(LB_HLP_1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LB_HLP_2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LB_HLP_3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(suatatancom_reklam)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LB_HLP_5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(LB_HLP_6))
                    .addComponent(LB_SUATATAN_RESIM))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        DIA_YARDIM.getContentPane().add(jPanel3);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("MOCAWA- BY SUATATAN.COM");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowActivated(java.awt.event.WindowEvent evt) {
                formWindowActivated(evt);
            }
        });
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        ANAEKRAN_PANEL.setBackground(new java.awt.Color(255, 255, 255));
        ANAEKRAN_PANEL.setMinimumSize(new java.awt.Dimension(750, 500));
        ANAEKRAN_PANEL.setPreferredSize(new java.awt.Dimension(750, 500));

        LOGO.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/ustlogo.png"))); // NOI18N

        TABLO1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(204, 153, 0)));
        TABLO1.setForeground(new java.awt.Color(204, 153, 0));
        TABLO1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        TABLO1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TABLO1MouseClicked(evt);
            }
        });
        SCROLL1.setViewportView(TABLO1);

        LB_TEKLIFLERINIZ.setFont(new java.awt.Font("Arial", 1, 14));
        LB_TEKLIFLERINIZ.setForeground(new java.awt.Color(204, 153, 0));
        LB_TEKLIFLERINIZ.setText("TEKLİFLERİNİZ:");

        BT_TEKLIF_EKLE_EKRANINI_AC.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/add.png"))); // NOI18N
        BT_TEKLIF_EKLE_EKRANINI_AC.setText("TEKLİF EKLE");
        BT_TEKLIF_EKLE_EKRANINI_AC.setToolTipText("Yeni teklif ekler");
        BT_TEKLIF_EKLE_EKRANINI_AC.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                BT_TEKLIF_EKLE_EKRANINI_ACMouseClicked(evt);
            }
        });

        BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_AC.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/update.png"))); // NOI18N
        BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_AC.setText("SEÇİLİ TEKLİFİ GÜNCELLE");
        BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_AC.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_ACMouseClicked(evt);
            }
        });

        SECILI_TEKLIFI_SIL.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/delete.png"))); // NOI18N
        SECILI_TEKLIFI_SIL.setText("SEÇİLİ TEKLİFİ SİL");
        SECILI_TEKLIFI_SIL.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                SECILI_TEKLIFI_SILMouseClicked(evt);
            }
        });

        SECILI_TEKLIF_DETAYI_INCELE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/detail.png"))); // NOI18N
        SECILI_TEKLIF_DETAYI_INCELE.setText("SEÇİLİ TEKLİF DETAYLARINI İNCELE");
        SECILI_TEKLIF_DETAYI_INCELE.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                SECILI_TEKLIF_DETAYI_INCELEMouseClicked(evt);
            }
        });

        BT_TUM_EBATLARI_LISTELE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/tum_ebatlar.png"))); // NOI18N
        BT_TUM_EBATLARI_LISTELE.setText("TÜM EBATLARI LİSTELE");
        BT_TUM_EBATLARI_LISTELE.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                BT_TUM_EBATLARI_LISTELEMouseClicked(evt);
            }
        });

        LB_SEC_TEK_NO.setText("Seçili Teklif No:");

        TXT_SECILI_TEKLIF_NO.setEditable(false);

        javax.swing.GroupLayout ANAEKRAN_PANELLayout = new javax.swing.GroupLayout(ANAEKRAN_PANEL);
        ANAEKRAN_PANEL.setLayout(ANAEKRAN_PANELLayout);
        ANAEKRAN_PANELLayout.setHorizontalGroup(
            ANAEKRAN_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ANAEKRAN_PANELLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ANAEKRAN_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(ANAEKRAN_PANELLayout.createSequentialGroup()
                        .addComponent(SCROLL1, javax.swing.GroupLayout.DEFAULT_SIZE, 1184, Short.MAX_VALUE)
                        .addContainerGap())
                    .addComponent(LOGO, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(ANAEKRAN_PANELLayout.createSequentialGroup()
                        .addComponent(LB_TEKLIFLERINIZ)
                        .addGap(103, 103, 103)
                        .addComponent(LB_SEC_TEK_NO)
                        .addGap(18, 18, 18)
                        .addComponent(TXT_SECILI_TEKLIF_NO, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(ANAEKRAN_PANELLayout.createSequentialGroup()
                        .addComponent(BT_TEKLIF_EKLE_EKRANINI_AC)
                        .addGap(18, 18, 18)
                        .addComponent(BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_AC)
                        .addGap(18, 18, 18)
                        .addComponent(SECILI_TEKLIFI_SIL)
                        .addGap(196, 196, 196)
                        .addComponent(SECILI_TEKLIF_DETAYI_INCELE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(BT_TUM_EBATLARI_LISTELE)
                        .addContainerGap(49, Short.MAX_VALUE))))
        );
        ANAEKRAN_PANELLayout.setVerticalGroup(
            ANAEKRAN_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ANAEKRAN_PANELLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(LOGO)
                .addGap(5, 5, 5)
                .addGroup(ANAEKRAN_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(LB_TEKLIFLERINIZ)
                    .addComponent(LB_SEC_TEK_NO)
                    .addComponent(TXT_SECILI_TEKLIF_NO, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(SCROLL1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(ANAEKRAN_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(BT_TEKLIF_EKLE_EKRANINI_AC)
                    .addComponent(BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_AC)
                    .addComponent(SECILI_TEKLIFI_SIL)
                    .addComponent(SECILI_TEKLIF_DETAYI_INCELE)
                    .addComponent(BT_TUM_EBATLARI_LISTELE))
                .addContainerGap(45, Short.MAX_VALUE))
        );

        getContentPane().add(ANAEKRAN_PANEL);

        MENU_PROGRAM.setText("Program");

        MENU_BIRIMFIYATKONF.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        MENU_BIRIMFIYATKONF.setText("Birim Fiyat Konfigürasyonu");
        MENU_BIRIMFIYATKONF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MENU_BIRIMFIYATKONFActionPerformed(evt);
            }
        });
        MENU_PROGRAM.add(MENU_BIRIMFIYATKONF);

        MENU.add(MENU_PROGRAM);

        MENU_YARDIM.setText("Yardım");

        MENU_PROGRAM_HAKKINDA.setText("Program hakkında");
        MENU_PROGRAM_HAKKINDA.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                MENU_PROGRAM_HAKKINDAMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MENU_PROGRAM_HAKKINDAMouseEntered(evt);
            }
        });
        MENU_PROGRAM_HAKKINDA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MENU_PROGRAM_HAKKINDAActionPerformed(evt);
            }
        });
        MENU_YARDIM.add(MENU_PROGRAM_HAKKINDA);

        MENU.add(MENU_YARDIM);

        setJMenuBar(MENU);

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void BT_TEKLIF_EKLE_EKRANINI_ACMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BT_TEKLIF_EKLE_EKRANINI_ACMouseClicked
    //FORM EKRANI BOSALTILIYOR      

    
    TEKLIF_EDITORUNU_TEKLIF_EKLEME_ICIN_AC();



}//GEN-LAST:event_BT_TEKLIF_EKLE_EKRANINI_ACMouseClicked
    /**
     * TEKLIF EKLEME DIALOGUNDA ACILAN EKLE BUTONU OLUP DUGME TIKLANINCA TEKLIF EKLENIR.
     * */
private void BT_TEKLIF_EKLEMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BT_TEKLIF_EKLEMouseClicked

    TEKLIFEKLE();
}//GEN-LAST:event_BT_TEKLIF_EKLEMouseClicked

private void BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_ACMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_ACMouseClicked


    SECILI_TEKLIF_VERISINI_GUNCELLEME_EKRANINA_YANSIT();
}//GEN-LAST:event_BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_ACMouseClicked
//BU BUTON TEKLIF EDITOR FORMUNDADIR
private void BT_TEKLIFI_GUNCELLEMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BT_TEKLIFI_GUNCELLEMouseClicked
        try {

            TEKLIF_GUNCELLE();
            op.teklif_listele("SELECT * FROM TEKLIFLER", TABLO1);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_BT_TEKLIFI_GUNCELLEMouseClicked

private void SECILI_TEKLIFI_SILMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SECILI_TEKLIFI_SILMouseClicked
    try {


        SECILI_TEKLIFI_VE_BAGLI_TUM_EBATLARI_SIL();
    } catch (SQLException ex) {
        Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);//GEN-LAST:event_SECILI_TEKLIFI_SILMouseClicked
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
    }
}

private void SECILI_TEKLIF_DETAYI_INCELEMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SECILI_TEKLIF_DETAYI_INCELEMouseClicked
        try {

            TEKLIF_DETAYLARINI_INCELE();
        } catch (Exception ex) {
            hata.hatamesajiac(ex);
        }
      
    
}//GEN-LAST:event_SECILI_TEKLIF_DETAYI_INCELEMouseClicked

private void YENI_EBAT_EKLEMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_YENI_EBAT_EKLEMouseClicked

    
    in.TEKNO.setText(LB_BAG_TEK_NO_DINAMIK.getText()); //EBAT HESAPLAMAMODULU index.java'daki componentlere erisir ve teklifnoyu yazdırır
    in.setSize(1000,350);
    in.setLocation(350, 350);
    in.setVisible(true);
    
}//GEN-LAST:event_YENI_EBAT_EKLEMouseClicked
/**
 * 
 * EBAT TABLOSUNU YENILER
 * @param evt
 */
private void EBAT_TABLOSU_YENILEMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_EBAT_TABLOSU_YENILEMouseClicked
        try {
// TODO OTOMATIK YENILEME SAGLANINCA BU KOD SILINECEK- MUHTEMELEN INDEX.JAVA'NIN AYRI BIR DOSYA OLMASI NEDENIYLE YENILEMIYOR.
          
            //ebatlar ekranindaki tabelden teklifno okunarak listlenior
            EBAT_LISTELE(LB_BAG_TEK_NO_DINAMIK.getText());
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        }
    
}//GEN-LAST:event_EBAT_TABLOSU_YENILEMouseClicked

private void SECILI_EBADI_SILMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SECILI_EBADI_SILMouseClicked
        try {

            SECILI_EBADI_SIL();
        } catch (SQLException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        }
    
}//GEN-LAST:event_SECILI_EBADI_SILMouseClicked

private void BT_TUM_EBATLARI_LISTELEMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_BT_TUM_EBATLARI_LISTELEMouseClicked
        try {

            TUM_EBATLARI_LISTELE();
        } catch (SQLException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
        }
    
    
}//GEN-LAST:event_BT_TUM_EBATLARI_LISTELEMouseClicked

/**
 * 
 * TABLO HER TIKLANINCA TEKLIFNO SECILIR
 * @param evt
 */
private void TABLO1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TABLO1MouseClicked

   
            
    TXT_SECILI_TEKLIF_NO.setText(op.secili_kayit(TABLO1, 0));
}//GEN-LAST:event_TABLO1MouseClicked
/**
 * LOG DOSYASI HER ACILISITA SILINIR
 * @param evt
 */
private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowActivated

    
   File logdosyasi=new File("beyin\\mocawa_log.htm");
   logdosyasi.delete();
}//GEN-LAST:event_formWindowActivated
public String rapor_metni="\n";
private void EBAT_PRINTMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_EBAT_PRINTMouseClicked
// TODO add your handling code here:
    
//    MessageFormat header = new MessageFormat(TABLO3.getValueAt(0, 4) +"{0,number,integer}");
// 
//    try {
//
//            TABLO2.print(JTable.PrintMode.FIT_WIDTH, header, null);
//
//        } catch (PrinterException ex) {
//            Logger.getLogger(anaekran.class.getName()).log(Level.SEVERE, null, ex);
//        }
    
        
    
//     String teklif_detayi="Teklif Kodu:"+TABLO3.getValueAt(0, 0).toString()+"\n" +
//                          "Muhattap Kuruluş:"+TABLO3.getValueAt(0, 1).toString()+"\n" +
//                          "Son geçerlilik tarihi:"+TABLO3.getValueAt(0, 2).toString()+"\n"+
//                          "Yetkili:"+TABLO3.getValueAt(0, 3).toString()+"\n"+
//                          "Telefon:"+TABLO3.getValueAt(0, 4).toString()+"\n"+
//                          "Fax:"+TABLO3.getValueAt(0, 5).toString()+"\n"+
//                          "Telif tarihi:"+TABLO3.getValueAt(0, 6).toString()+"\n"+
//                           "";
//                          
// 
//     //TODO JTABLE YAZDIRMA TEKNIGI YAPILACAK   
//     
//     
//     reporterpack.reporter rp=new reporterpack.reporter(teklif_detayi);
//     rp.setVisible(true);
    
        reporterpack.TablePrintSample tbr=new reporterpack.TablePrintSample();
    tbr.setVisible(true);

     
    
}//GEN-LAST:event_EBAT_PRINTMouseClicked

private void MENU_BIRIMFIYATKONFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MENU_BIRIMFIYATKONFActionPerformed
index br_f_konf=new index();

index i=new index();
i.birim_fiyat_verilerini_getir();

i.DIABRFCNFG.setSize(500, 400);
        i.DIABRFCNFG.setLocation(333, 333);

        i.DIABRFCNFG.setVisible(true);
    
    
}//GEN-LAST:event_MENU_BIRIMFIYATKONFActionPerformed

private void MENU_PROGRAM_HAKKINDAMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MENU_PROGRAM_HAKKINDAMouseEntered
// TODO add your handling code here:
}//GEN-LAST:event_MENU_PROGRAM_HAKKINDAMouseEntered

private void MENU_PROGRAM_HAKKINDAMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MENU_PROGRAM_HAKKINDAMouseClicked
// TODO add your handling code here:
    
   
}//GEN-LAST:event_MENU_PROGRAM_HAKKINDAMouseClicked

private void MENU_PROGRAM_HAKKINDAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MENU_PROGRAM_HAKKINDAActionPerformed
// TODO add your handling code here:
     DIA_YARDIM.setTitle("MOCAWA HAKKINDA");
     DIA_YARDIM.setVisible(true);
}//GEN-LAST:event_MENU_PROGRAM_HAKKINDAActionPerformed

    @SuppressWarnings("static-access")
private void LB_HLP_3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_LB_HLP_3MouseClicked
// TODO add your handling code here:
        
        
       
       
}//GEN-LAST:event_LB_HLP_3MouseClicked

private void suatatancom_reklamMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_suatatancom_reklamMouseClicked
// TODO add your handling code here:
    
    
     tarayici_kontrolu.tarayici_ackapa br = new tarayici_kontrolu.tarayici_ackapa();
        tarayici_kontrolu.tarayici_ackapa _tmp = br;
        tarayici_ackapa.internet_adresi_ac("http://www.suatatan.com");
    
    
}//GEN-LAST:event_suatatancom_reklamMouseClicked

//-----------------------------ÖZEL FONKSIYONLAR---------------------------------

/**
 * 
 * TUM EBATLARI SILME VE YENI EBAT EKLEME BUTONLARINI SAKLAYARAK LISTELER/READONLY
 * @throws java.sql.SQLException
 * @throws java.lang.ClassNotFoundException
 */
        
        

public void TUM_EBATLARI_LISTELE() throws SQLException, ClassNotFoundException
{
     LB_BAG_TEK_NO_DINAMIK.setText("TUM EBATLAR");//teklifno ekrana yansıtılıyor
    
   
    String sql="SELECT * FROM TEKLIFLISTESI";
    op.ebat_listele(sql, TABLO4);
   
    
   
    DIA_TUM_EBATLAR.setSize(950,500);
    DIA_TUM_EBATLAR.setVisible(true);
    
}



/**
 * 
 * BIR TEKLIF VE ONA BAGLI TUM EBATLARI SILER
 * @throws java.sql.SQLException
 * @throws java.lang.ClassNotFoundException
 */
public void SECILI_TEKLIFI_VE_BAGLI_TUM_EBATLARI_SIL() throws SQLException, ClassNotFoundException
{
    
    
     String teklifno=TXT_SECILI_TEKLIF_NO.getText(); //TEKLIFNO TXTFIELLDEN OKUNUR
    op.kayit_sil("TEKLIFLER", "TEKLIFNO", teklifno);
    op.teklif_listele("SELECT * FROM TEKLIFLER", TABLO1);
    //BAGLI EBATLARI SILME-TABLO1'DEN ALINAN TEKLIFNOYA BAGLI TUM EBATLARI SILECAZ
    op.kayit_sil("TEKLIFLISTESI", "TEKLIFNO", teklifno);
    
}




/**
 * 
 * YANLIZCA SECILI EBATI SILER
 * @throws java.sql.SQLException
 * @throws java.lang.ClassNotFoundException
 */

public void SECILI_EBADI_SIL() throws SQLException, ClassNotFoundException
{
    op.kayit_sil("TEKLIFLISTESI", "EBAT_SERI_NO", op.secili_kayit(TABLO2, 10));
    EBAT_LISTELE(LB_BAG_TEK_NO_DINAMIK.getText());
    
}




/**
 * 
 * SADECE EBAT LISTESINI TAZELER FORM OPERASYONU YAPMAZ.
 * @param teklifno hangi teklifnoya bagli ebatlar listelenecek
 * @throws java.lang.ClassNotFoundException
 * @throws java.sql.SQLException
 */


public void EBAT_LISTELE(String teklifno) throws ClassNotFoundException, SQLException
{
   
    String sql="SELECT * FROM TEKLIFLISTESI WHERE TEKLIFNO='"+teklifno+"'";
    op.ebat_listele(sql, TABLO2);
    LB_BAG_TEK_NO_DINAMIK.setText(teklifno);//teklifno ekrana yansıtılıyor
    
    o.log("EBAT LISTESI YENILENIYOR");
}




/**
 * 
 * TEKLIFE BAGLI KUTU EBATLARINI LISTELEYEN EKRANI ACAR
 * @throws java.lang.ClassNotFoundException
 * @throws java.sql.SQLException
 */

public void TEKLIF_DETAYLARINI_INCELE() throws ClassNotFoundException, SQLException
{
    String teklifno=TXT_SECILI_TEKLIF_NO.getText(); //TEKLIFNO TXTFIELLDEN OKUNUR
    LB_BAG_TEK_NO_DINAMIK.setText(teklifno);//teklifno ekrana yansıtılıyor
    
    
   
    String sql_teklif="SELECT * FROM TEKLIFLER WHERE TEKLIFNO="+teklifno;
     String sql_ebat="SELECT * FROM TEKLIFLISTESI WHERE TEKLIFNO="+teklifno;
    op.teklif_listele(sql_teklif, TABLO3);
    op.ebat_listele(sql_ebat, TABLO2);
    
 
    //operasyon dugmeleri olusturulutor
    
    SECILI_EBADI_SIL.setVisible(true);
    YENI_EBAT_EKLE.setVisible(true);
    EBAT_TABLOSU_YENILE.setVisible(true);
    DIA_TEKLIF_DETAYI.setSize(1200,750);
    DIA_TEKLIF_DETAYI.setVisible(true);
}




/**
 * TEKLIF GUNCELLEME ISLEMINI YAPAR DIREKT OLARAK CAGRILMASI YETERLIDIR
 * 
 * @throws java.lang.ClassNotFoundException
 * @throws java.sql.SQLException
 */

    public void TEKLIF_GUNCELLE() throws ClassNotFoundException, SQLException {
        //teehlike mesaji vermesin diye obkect tagi arasina aldim
        Vector <Object> teklif = new Vector<Object>();
       
        teklif.addElement(TXT_TEKLIF_TO.getText());
        teklif.addElement(TXT_SON_GECERLILIK_TARIHI.getText());
        teklif.addElement(TXT_YETKILI.getText());
        teklif.addElement(TXT_TELEFON.getText());
        teklif.addElement(TXT_FAX.getText());
        teklif.addElement(TXT_TEKLIF_TARIHI.getText());
        
        teklif.addElement(TXT_TEKLIFNO.getText()); //PRIMARY KEY OLARAK EKLENDI
        Enumeration teklif_bilgileri = teklif.elements();
        op.teklif_guncelle(teklif_bilgileri);
        LB_TEKLIF_OLUSTURMA_STATUS.setText("Teklif Güncellendi");
        DIA_TEKLIF_EDITORU.setVisible(false);
        

    }

    /**
     *TEKLIF EDITORUNU TEKLIF EKLEME ICIN ACAR 
     * 
     */
    public void TEKLIF_EDITORUNU_TEKLIF_EKLEME_ICIN_AC() {
        editor_temizle();
        DIA_TEKLIF_EDITORU.setSize(500, 350);
        BT_TEKLIFI_GUNCELLE.setVisible(false);
        BT_TEKLIF_EKLE.setVisible(true);
        DIA_TEKLIF_EDITORU.setVisible(true);


    }

    /**
     * 
     * TEKLIF OLUSTURMA GUNCELLME EDITORUNU TEMIZLER
     */
    public void editor_temizle() {
        TXT_TEKLIFNO.setText("Otomatik");
        TXT_TEKLIFNO.setText("");
        TXT_TEKLIF_TO.setText("");
        TXT_SON_GECERLILIK_TARIHI.setText("");
        TXT_YETKILI.setText("");
        TXT_TELEFON.setText("");
        TXT_FAX.setText("");
        TXT_TEKLIF_TARIHI.setText("");
        LB_TEKLIF_OLUSTURMA_STATUS.setText("");
        DIA_TEKLIF_EDITORU.setTitle("TEKLİF EDİTORÜ");
    }

    /**
     * 
     * SECILI OLAN TEKLIF BILGILERINIE TEKLIF EDITORUNE YANSITIR
     */
    public void SECILI_TEKLIF_VERISINI_GUNCELLEME_EKRANINA_YANSIT() {
        editor_temizle();
        int r = TABLO1.getSelectedRow();
        System.out.println("Row:" + r);
//  int c=TABLO1.getSelectedColumn();
//  System.out.println("Column"+c);

        TXT_TEKLIFNO.setText((String) TABLO1.getValueAt(r, 0));
        TXT_TEKLIF_TO.setText((String) TABLO1.getValueAt(r, 1));
        TXT_SON_GECERLILIK_TARIHI.setText((String) TABLO1.getValueAt(r, 2));
        TXT_YETKILI.setText((String) TABLO1.getValueAt(r, 3));
        TXT_TELEFON.setText((String) TABLO1.getValueAt(r, 4));
        TXT_FAX.setText((String) TABLO1.getValueAt(r, 5));
        TXT_TEKLIF_TARIHI.setText((String) TABLO1.getValueAt(r, 6));

        //GÜNCELLEME FORMU ACILIYOR
        DIA_TEKLIF_EDITORU.setTitle("GÜNCELLEME FORMU, FİRMA: " + (String) TABLO1.getValueAt(r, 1));
        BT_TEKLIFI_GUNCELLE.setVisible(true);
        BT_TEKLIF_EKLE.setVisible(false);
        DIA_TEKLIF_EDITORU.setLocation(300, 300);
        DIA_TEKLIF_EDITORU.setSize(500, 350);
        DIA_TEKLIF_EDITORU.setVisible(true);


    }

    /**
     * 
     * TEKLIF EDITORU ACIKKEN, YAZILI BILGILERI TEKLIF OLARAK EKLER
     */
    public void TEKLIFEKLE() {
        //TODO bu fonksiyonlar duzeltilecek
        String anahtar = key.tarihi_key();

        try {



            System.out.println("TARIHI KEY CREATED:" + anahtar);
            Vector teklif = new Vector();
            Enumeration teklif_bilgileri;
            teklif.addElement(anahtar);

            teklif.addElement(TXT_TEKLIF_TO.getText());

            teklif.addElement(TXT_SON_GECERLILIK_TARIHI.getText());
            teklif.addElement(TXT_YETKILI.getText());
            teklif.addElement(TXT_TELEFON.getText());
            teklif.addElement(TXT_FAX.getText());
            teklif.addElement(TXT_TEKLIF_TARIHI.getText());

            System.out.println("TEKTARIHI  CREATED:" + TXT_TEKLIF_TARIHI.getText());
             teklif_bilgileri= teklif.elements();
            op.teklif_ekle(teklif_bilgileri);
            op.teklif_listele("SELECT * FROM TEKLIFLER", TABLO1);
            LB_TEKLIF_OLUSTURMA_STATUS.setText("TEKLİF OLUŞTURULDU");
            DIA_TEKLIF_EDITORU.setVisible(false);
        } catch (Exception ex) {
            LB_TEKLIF_OLUSTURMA_STATUS.setText("TEKLİF OLUŞTURLAMADI, HATA ICIN  LOG DOSYASINA BAKIN");
            o.log(ex);
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new anaekran().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel ANAEKRAN_PANEL;
    private javax.swing.JButton BT_SECILI_TEKLIFI_GUNCELLEME_EKRANINI_AC;
    private javax.swing.JButton BT_TEKLIFI_GUNCELLE;
    private javax.swing.JButton BT_TEKLIF_EKLE;
    private javax.swing.JButton BT_TEKLIF_EKLE_EKRANINI_AC;
    private javax.swing.JButton BT_TUM_EBATLARI_LISTELE;
    private javax.swing.JDialog DIA_TEKLIF_DETAYI;
    public javax.swing.JDialog DIA_TEKLIF_EDITORU;
    private javax.swing.JPanel DIA_TEKLIF_EDITOR_PANELI;
    private javax.swing.JDialog DIA_TUM_EBATLAR;
    private javax.swing.JDialog DIA_YARDIM;
    private javax.swing.JButton EBAT_PRINT;
    private javax.swing.JButton EBAT_TABLOSU_YENILE;
    private javax.swing.JLabel HELP_LAB1;
    private javax.swing.JLabel LB_BAG_TEK_NO;
    private javax.swing.JLabel LB_BAG_TEK_NO_DINAMIK;
    private javax.swing.JLabel LB_FAX;
    private javax.swing.JLabel LB_HLP_1;
    private javax.swing.JLabel LB_HLP_2;
    private javax.swing.JLabel LB_HLP_3;
    private javax.swing.JLabel LB_HLP_5;
    private javax.swing.JLabel LB_HLP_6;
    private javax.swing.JLabel LB_ILGILI_TEKLIF;
    private javax.swing.JLabel LB_SEC_TEK_NO;
    private javax.swing.JLabel LB_SON_GECERLILIK_TARIHI;
    private javax.swing.JLabel LB_SUATATAN_RESIM;
    private javax.swing.JLabel LB_TEKLIFLERINIZ;
    private javax.swing.JLabel LB_TEKLIF_DETAYLARI_BASLIK;
    private javax.swing.JLabel LB_TEKLIF_OLUSTURMA_GUNCELLEME_FORMU;
    public javax.swing.JLabel LB_TEKLIF_OLUSTURMA_STATUS;
    private javax.swing.JLabel LB_TEKLIF_TARIHI;
    private javax.swing.JLabel LB_TEKLIF_TO;
    private javax.swing.JLabel LB_TELEFON;
    private javax.swing.JLabel LB_TUM_EBATLAR;
    private javax.swing.JLabel LB_YETKILI;
    private javax.swing.JLabel LOGO;
    private javax.swing.JMenuBar MENU;
    private javax.swing.JMenuItem MENU_BIRIMFIYATKONF;
    private javax.swing.JMenu MENU_PROGRAM;
    private javax.swing.JMenuItem MENU_PROGRAM_HAKKINDA;
    private javax.swing.JMenu MENU_YARDIM;
    private javax.swing.JScrollPane SCROLL1;
    private javax.swing.JButton SECILI_EBADI_SIL;
    private javax.swing.JButton SECILI_TEKLIFI_SIL;
    private javax.swing.JButton SECILI_TEKLIF_DETAYI_INCELE;
    public javax.swing.JTable TABLO1;
    public javax.swing.JTable TABLO2;
    public javax.swing.JTable TABLO3;
    public javax.swing.JTable TABLO4;
    private javax.swing.JLabel TEKLIFNO;
    public javax.swing.JTextField TXT_FAX;
    private javax.swing.JTextField TXT_SECILI_TEKLIF_NO;
    public javax.swing.JTextField TXT_SON_GECERLILIK_TARIHI;
    private javax.swing.JTextField TXT_TEKLIFNO;
    public javax.swing.JTextField TXT_TEKLIF_TARIHI;
    public javax.swing.JTextField TXT_TEKLIF_TO;
    public javax.swing.JTextField TXT_TELEFON;
    public javax.swing.JTextField TXT_YETKILI;
    private javax.swing.JButton YENI_EBAT_EKLE;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JLabel suatatancom_reklam;
    // End of variables declaration//GEN-END:variables
}
